<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>api_shim.core.http.HttpClientRequest</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;api_shim ::
        <a href="api_shim.core-module.html">Package&nbsp;core</a> ::
        <a href="api_shim.core.http-module.html">Module&nbsp;http</a> ::
        Class&nbsp;HttpClientRequest
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="api_shim.core.http.HttpClientRequest-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class HttpClientRequest</h1><p class="nomargin-top"><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest">source&nbsp;code</a></span></p>
<pre class="base-tree">
         object --+    
                  |    
<a href="api_shim.core.streams.WriteStream-class.html">streams.WriteStream</a> --+
                      |
                     <strong class="uidshort">HttpClientRequest</strong>
</pre>

<hr />
<p>Instances of this class are created by an HttpClient instance, via one
  of the methods corresponding to the specific HTTP methods, or the generic
  HttpClient request method.</p>
  <p>Once an instance of this class has been obtained, headers can be set 
  on it, and data can be written to its body, if required. Once you are 
  ready to send the request, the end method must called.</p>
  <p>Nothing is sent until the request has been internally assigned an HTTP
  connection. The HttpClient instance will return an instance of this class
  immediately, even if there are no HTTP connections available in the pool.
  Any requests sent before a connection is assigned will be queued 
  internally and actually sent when an HTTP connection becomes available 
  from the pool.</p>
  <p>The headers of the request are actually sent either when the end 
  method is called, or, when the first part of the body is written, 
  whichever occurs first.</p>
  <p>This class supports both chunked and non-chunked HTTP.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">java_obj</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#headers" class="summary-sig-name">headers</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Headers for the request</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.headers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#put_header" class="summary-sig-name">put_header</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">key</span>,
        <span class="summary-sig-arg">value</span>)</span><br />
      Inserts a header into the request.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.put_header">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#write_str" class="summary-sig-name">write_str</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">str</span>,
        <span class="summary-sig-arg">enc</span>=<span class="summary-sig-default">&quot;UTF-8&quot;</span>)</span><br />
      Write a to the request body.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_str">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#send_head" class="summary-sig-name">send_head</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Forces the head of the request to be written before end is called on 
      the request.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.send_head">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#end" class="summary-sig-name">end</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Ends the request.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.end">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#write_str_and_end" class="summary-sig-name">write_str_and_end</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">str</span>,
        <span class="summary-sig-arg">enc</span>=<span class="summary-sig-default">&quot;UTF-8&quot;</span>)</span><br />
      Same as write_buffer_and_end but writes a String</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_str_and_end">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#write_buffer_and_end" class="summary-sig-name">write_buffer_and_end</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">chunk</span>)</span><br />
      Same as end but writes some data to the response body before ending.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_buffer_and_end">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#set_chunked" class="summary-sig-name">set_chunked</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">val</span>)</span><br />
      Sets whether the request should used HTTP chunked encoding or not.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.set_chunked">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="is_chunked"></a><span class="summary-sig-name">is_chunked</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.is_chunked">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#set_timeout" class="summary-sig-name">set_timeout</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">val</span>)</span><br />
      Set's the amount of time after which if a response is not received 
      TimeoutException() will be sent to the exception handler of this 
      request.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.set_timeout">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="api_shim.core.http.HttpClientRequest-class.html#continue_handler" class="summary-sig-name">continue_handler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handler</span>)</span><br />
      If you send an HTTP request with the header 'Expect' set to the value
      '100-continue' and the server responds with an interim HTTP response 
      with a status code of '100' and a continue handler has been set using
      this method, then the handler will be called.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.continue_handler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="api_shim.core.streams.WriteStream-class.html">streams.WriteStream</a></code></b>:
      <code><a href="api_shim.core.streams.WriteStream-class.html#drain_handler">drain_handler</a></code>,
      <code><a href="api_shim.core.streams.WriteStream-class.html#exception_handler">exception_handler</a></code>,
      <code><a href="api_shim.core.streams.WriteStream-class.html#get_write_queue_max_size">get_write_queue_max_size</a></code>,
      <code><a href="api_shim.core.streams.WriteStream-class.html#set_write_queue_max_size">set_write_queue_max_size</a></code>,
      <code><a href="api_shim.core.streams.WriteStream-class.html#write">write</a></code>,
      <code><a href="api_shim.core.streams.WriteStream-class.html#write_queue_full">write_queue_full</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="api_shim.core.streams.WriteStream-class.html">streams.WriteStream</a></code></b> (private):
      <code><a href="api_shim.core.streams.WriteStream-class.html#_to_write_stream" onclick="show_private();">_to_write_stream</a></code>
      </p></div>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="chunked"></a><span class="summary-name">chunked</span> = <code title="property(is_chunked, set_chunked)">property(is_chunked, set_chunked)</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="timeout"></a><span class="summary-name">timeout</span> = <code title="property(fset= set_timeout)">property(fset= set_timeout)</code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="api_shim.core.streams.WriteStream-class.html">streams.WriteStream</a></code></b>:
      <code><a href="api_shim.core.streams.WriteStream-class.html#write_queue_max_size">write_queue_max_size</a></code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">java_obj</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="headers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">headers</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.headers">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Headers for the request</p>
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@property</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="put_header"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">put_header</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">key</span>,
        <span class="sig-arg">value</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.put_header">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Inserts a header into the request.</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>key</code></strong> - The header key</li>
        <li><strong class="pname"><code>value</code></strong> - The header value.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>self so multiple operations can be chained.</dd>
  </dl>
</td></tr></table>
</div>
<a name="write_str"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">write_str</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">str</span>,
        <span class="sig-arg">enc</span>=<span class="sig-default">&quot;UTF-8&quot;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_str">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Write a to the request body.</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>str</code></strong> - The string to write.</li>
        <li><strong class="pname"><code>enc</code></strong> - The encoding to use.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>self So multiple operations can be chained.</dd>
  </dl>
</td></tr></table>
</div>
<a name="send_head"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">send_head</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.send_head">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Forces the head of the request to be written before end is called on 
  the request. This is normally used to implement HTTP 100-continue 
  handling, see continue_handler for more information.</p>
  <dl class="fields">
    <dt>Returns:</dt>
        <dd>self So multiple operations can be chained.</dd>
  </dl>
</td></tr></table>
</div>
<a name="end"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">end</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.end">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Ends the request. If no data has been written to the request body, and
  send_head has not been called then the actual request won't get written 
  until this method gets called. Once the request has ended, it cannot be 
  used any more, and if keep alive is true the underlying connection will 
  be returned to the HttpClient pool so it can be assigned to another 
  request.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="write_str_and_end"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">write_str_and_end</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">str</span>,
        <span class="sig-arg">enc</span>=<span class="sig-default">&quot;UTF-8&quot;</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_str_and_end">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Same as write_buffer_and_end but writes a String</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>str</code></strong> - The String to write</li>
        <li><strong class="pname"><code>enc</code></strong> - The encoding</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="write_buffer_and_end"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">write_buffer_and_end</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">chunk</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.write_buffer_and_end">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Same as end but writes some data to the response body before ending. 
  If the response is not chunked and no other data has been written then 
  the Content-Length header will be automatically set</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>chunk</code></strong> - The Buffer to write</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="set_chunked"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_chunked</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.set_chunked">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Sets whether the request should used HTTP chunked encoding or not.</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>val</code></strong> - If val is true, this request will use HTTP chunked encoding, and 
          each call to write to the body will correspond to a new HTTP 
          chunk sent on the wire. If chunked encoding is used the HTTP 
          header 'Transfer-Encoding' with a value of 'Chunked' will be 
          automatically inserted in the request.
          <p>If chunked is false, this request will not use HTTP chunked 
          encoding, and therefore if any data is written the body of the 
          request, the total size of that data must be set in the 
          'Content-Length' header before any data is written to the request
          body.</p></li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>self So multiple operations can be chained.</dd>
  </dl>
</td></tr></table>
</div>
<a name="set_timeout"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">set_timeout</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">val</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.set_timeout">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Set's the amount of time after which if a response is not received 
  TimeoutException() will be sent to the exception handler of this request.
  Calling this method more than once has the effect of canceling any 
  existing timeout and starting the timeout from scratch.</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>val</code></strong> - The quantity of time in milliseconds.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>self So multiple operations can be chained.</dd>
  </dl>
</td></tr></table>
</div>
<a name="continue_handler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">continue_handler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">handler</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="api_shim.core.http-pysrc.html#HttpClientRequest.continue_handler">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>If you send an HTTP request with the header 'Expect' set to the value 
  '100-continue' and the server responds with an interim HTTP response with
  a status code of '100' and a continue handler has been set using this 
  method, then the handler will be called. You can then continue to write 
  data to the request body and later end it. This is normally used in 
  conjunction with the send_head method to force the request header to be 
  written before the request has ended.</p>
  <p>Keyword arguments:</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>handler</code></strong> - The handler</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Wed Jul 17 20:24:59 2013
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>